package cn.avalon.feigenClients;

import cn.avalon.domain.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @description: User服务feign接口
 * @author: Avalon
 * @date: 2022年09月22日 ： 10:53
 * @version: ver1.0
 * @email 709785494@qq.com
 */
@FeignClient(value = "user-service", fallbackFactory = UserFeignClientFallbackFactory.class)
@RequestMapping("/user")
public interface UserFeignClient {

    @GetMapping("/{id}")
    User findById(@PathVariable("id") Long id);
}
